@BSavePrefs @P@ICopyright Gold Disk Inc., January, 1992
This Genie will save any settings in the current PPage environment to a config file. Professional Page will then always start up with your specified settings. (Example: Magnification, Colormode, Interlace, etc...)
*/
address command
call SafeEndEdit.rexx()
cr = '0a'x
startclip = "/*****Start Clips*****/"
endclip = "/*****End Clips*****/"
startprefs = "/*****Start Prefs*****/"
endprefs = "/*****End Prefs*****/"
startsave = "/*****StartSave*****/"
endsave = "/*****EndSave*******/"
startupfile = "s:ppage.config"
styletagdef = "s:styletags.dflt"
paratagdef = "s:paratags.dflt"
startup = ''
clist = 0
selection = "AngleStep"
selection = selection || cr"BaseLine"
selection = selection || cr"BoxOutlines"
selection = selection || cr"ColorMode"
selection = selection || cr"Columns"
selection = selection || cr"DateFormat"
selection = selection || cr"DitherMode"
selection = selection || cr"FillColor"
selection = selection || cr"FillPattern"
selection = selection || cr"Font"
selection = selection || cr"Grid"
selection = selection || cr"GridSize"
selection = selection || cr"GridSnap"
selection = selection || cr"Hyphenation"
selection = selection || cr"HyphenControl"
selection = selection || cr"HyphenLang"
selection = selection || cr"Interlace"
selection = selection || cr"Interrupt"
selection = selection || cr"Justification"
selection = selection || cr"Kerning"
selection = selection || cr"LineColor"
selection = selection || cr"LinePattern"
selection = selection || cr"LineSpacing"
selection = selection || cr"LineWeight"
selection = selection || cr"MagMode"
selection = selection || cr"PageNumFormat"
selection = selection || cr"ParaTag"
selection = selection || cr"QuickMove"
selection = selection || cr"RulerType"
selection = selection || cr"Size"
selection = selection || cr"Style"
selection = selection || cr"StyleTag"
selection = selection || cr"TextColor"
selection = selection || cr"TextGreek"
selection = selection || cr"TextFilter"
selection = selection || cr"Tracking"
selection = selection || cr"Units"
selection = selection || cr"WireFrame"
selection = selection || cr"Workbench"
counter = 1
special = "TEXTCOLOR TEXTFILTER FONT LINECOLOR FILLCOLOR PARATAG STYLETAG"
/* if exists then read file into line array and separate sections */
entry = "In order to facilitate automated address entry using Page Genies, Professional Pages stores personal information in a configuration file. Would you like to fill out the info form?"
if ppm_Inform(2, entry,"No","Yes") then
do
form = "Name"cr"Company Name"cr"Address"cr"City"cr"State/Province"cr"Country"cr"Zip/Postal Code"cr"Phone"cr"Fax"
form = ppm_GetForm("Information Form", 35, form)
if form = '' then exit_msg()
parse var form name '0a'x comp '0a'x add '0a'x city '0a'x state '0a'x country '0a'x zc '0a'x phone '0a'x fax
prefix = "call setclip(ppuser_"
clips.1 = startclip
clips.2 = prefix || 'name,"'name'")'
clips.3 = prefix || 'company,"'comp'")'
clips.4 = prefix || 'address,"'add'")'
clips.5 = prefix || 'phone,"'phone'")'
clips.6 = prefix || 'zipcode,"'zc'")'
clips.7 = prefix || 'city,"'city'")'
clips.8 = prefix || 'state,"'state'")'
clips.9 = prefix || 'country,"'country'")'
clips.10 = prefix || 'fax,"'fax'")'
clips.11= endclip
clist = 11
end
end
else
do
if ~open(file, startupfile, "r") then
call exit_msg("DOS error. Unable to create a configuration file.")
do while ~eof(file)
text = strip(readln(file))
if text = '' then iterate
if text = startprefs then
do while ~eof(file)
text = readln(file)
if text = endprefs then leave
end
else if text = startsave then
do while ~eof(file)
text = readln(file)
if text = endsave then leave
end
else
startup = startup || cr || text
end
call close(file)
end
if exists(startupfile) then
do
address command
'copy' startupfile startupfile".bak"
address
end
selection = ppm_SelectFromList("Select Settings to Save", 20, 9, 1, selection)
if selection = '' then exit_msg()
/* execute instructions at the end of list first >> SETUNITS */